package com.yb.nowcoder;

import java.util.Scanner;

/**
 * 华为机试练习第5题
 */
public class Main6 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextLong()) {
            long l = in.nextLong();
            for (int k = 2; k <= l; k++) {
                while (l % k == 0) {
                    if (l != k) {
                        System.out.print(k + " ");
                        l /= k;
                    } else {
                        System.out.print(k + " ");
                        break;
                    }
                }
            }
        }
    }
}
